import service from '@/utils/request'

// @Tags Staff
// @Summary 创建staff表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Staff true "创建staff表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /staff/createStaff [post]
export const createStaff = (data) => {
  return service({
    url: '/staff/createStaff',
    method: 'post',
    data
  })
}

// @Tags Staff
// @Summary 删除staff表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Staff true "删除staff表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /staff/deleteStaff [delete]
export const deleteStaff = (data) => {
  return service({
    url: '/staff/deleteStaff',
    method: 'delete',
    data
  })
}

// @Tags Staff
// @Summary 批量删除staff表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除staff表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /staff/deleteStaff [delete]
export const deleteStaffByIds = (data) => {
  return service({
    url: '/staff/deleteStaffByIds',
    method: 'delete',
    data
  })
}

// @Tags Staff
// @Summary 更新staff表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Staff true "更新staff表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /staff/updateStaff [put]
export const updateStaff = (data) => {
  return service({
    url: '/staff/updateStaff',
    method: 'put',
    data
  })
}

// @Tags Staff
// @Summary 用id查询staff表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.Staff true "用id查询staff表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /staff/findStaff [get]
export const findStaff = (params) => {
  return service({
    url: '/staff/findStaff',
    method: 'get',
    params
  })
}

// @Tags Staff
// @Summary 分页获取staff表列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取staff表列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /staff/getStaffList [get]
export const getStaffList = (params) => {
  return service({
    url: '/staff/getStaffList',
    method: 'get',
    params
  })
}

